package com.kasa.zto;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2008</p>
 *
 * <p>Company: </p>
 *
 * @author gary
 * @version 1.0
 */
public final class ZTOTag
{
    private static final String TagNames[] =
        {"null", "Boolean", "Byte", "Short", "Integer", "Long", "Float", "Double",
        "byte", "short", "int", "long", "float", "double", "String", "Date", "Time", "ZTOType", "ZTOAny", "ZTOArrayList", "ZTOLinkedHashMap", "UNKNOW"};

    public static final byte NULL = 0;

    public static final byte BOOLEAN = 1;

    public static final byte Byte = 2;
    
    public static final byte Short = 3;

    public static final byte Integer = 4;

    public static final byte Long = 5;

    public static final byte Float = 6;

    public static final byte Double = 7;

    public static final byte _byte = 8;

    public static final byte _short = 9;

    public static final byte _int = 10;

    public static final byte _long = 11;

    public static final byte _float = 12;

    public static final byte String = 13;

    public static final byte Date = 14;

    public static final byte Time = 15;

    public static final byte ZTOType = 16;

    public static final byte ZTOAny = 17;

    public static final byte ZTOArrayList = 18;

    public static final byte ZTOLinkedHashMap = 19;

    public static final byte UNKNOW = 50;

    public String getTagName(byte b)
    {
        return TagNames[b];
    }

    public byte getTagNumber(String tagName)
    {
        for (byte i = 0, size = (byte) TagNames.length; i < size; i++)
        {
            if (TagNames[i].equals(tagName))
            {
                return i;
            }
        }
        return -1;
    }
}
